
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Get or set the desktop wallpaper
Works on macOS 10.12+, Linux, and Windows 10+.
Maintainer needed for the Linux part of the code. No new Linux-related changes will be accepted until someone with good Linux knowledge volunteers.
$ npm install wallpaper
const wallpaper = require('wallpaper');
(async () => {
await wallpaper.set('unicorn.jpg');
await wallpaper.get();
//=> '/Users/sindresorhus/unicorn.jpg'
})();
Returns a Promise<string>
with the path of the current desktop wallpaper.
Type: object
Type: string | number
Values: 'all'
, 'main'
, or the index of a screen from .screens()
Default: 'main'
The screen to get the wallpaper from.
If you set 'all'
then .get()
will return a Promise<string[]>
.
Returns a Promise
.
Type: string
The path to the image to set as the desktop wallpaper.
Type: object
Type: string | number
Values: 'all'
, 'main'
, or the index of a screen from .screens()
Default: 'all'
The screen to set the wallpaper on.
On Linux and Windows it's hard-coded to 'main'
.
Type: string
Values: 'auto' | 'fill' | 'fit' | 'stretch' | 'center'
Default: 'auto'
Scaling method.
Returns a Promise<string[]>
with the available screens.
(async () => {
await wallpaper.screens();
//=> ['Color LCD']
})();
If you only need a static snapshot of the website, you can use capture-website
and then pass the result to this package. You can make it semi-dynamic, by capturing the website snapshot every 10 seconds, for example.
You cannot use this package to set a dynamic wallpaper.
On macOS, check out Plash, which lets you set any website as your wallpaper. The website could contain a fullscreen video, WebGL, slideshow, animated, etc.
You can also do this with Electron on macOS and Linux by using new BrowserWindow({type: 'desktop'})
.
On Windows, you can use Wallpaper Engine. It's available on Steam, HumbleBundle, and Green Man Gaming for around 4 USD.
FAQs
Manage the desktop wallpaper
The npm package wallpaper receives a total of 278 weekly downloads. As such, wallpaper popularity was classified as not popular.
We found that wallpaper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.